﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Pahan.McuFusion.Common.Utils
{
    public static class WaitHelper
    {
         public static void Wait(int microseconds)
         {
             Stopwatch stopwatch = Stopwatch.StartNew();
             bool finished;
             do
             {
                 finished = (1000000L * stopwatch.ElapsedTicks) / Stopwatch.Frequency > microseconds;
             }
             while (!finished);
             stopwatch.Stop();
         }
    }
}
